package com.zhang.spark_2.com.zhang.core.transform

import org.apache.spark.{SparkConf, SparkContext}

/**
 * @title:
 * @author: zhang
 * @date: 2022/2/12 16:29 
 */
object Spark01_Map {
  def main(args: Array[String]): Unit = {
    val conf = new SparkConf().setMaster("local[*]").setAppName("map")
    val sc = new SparkContext(conf)

    sc.makeRDD(List(1, 2, 3, 4),2).coalesce(4,true).saveAsTextFile("input/")


    /*  .map(_ * 2)
      .collect()
      .foreach(println)*/

    sc.stop()
  }

}
